Skip to content

feat: add storage-rent budget pre-flight check on create_market to prevent under-funded archives#773

Merged
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
Songu3020:feat/storage-rent-budget-preflight-check-create-market
Jun 29, 2026
Merged

feat: add storage-rent budget pre-flight check on create_market to prevent under-funded archives#773
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
Songu3020:feat/storage-rent-budget-preflight-check-create-market

Conversation

@Songu3020

Copy link
Copy Markdown
Contributor

closes
#634

Adds a storage-rent budget pre-flight check on create_market to prevent under-funded archives.

Changes

  • contracts/predictify-hybrid/src/err.rs: Added new error variant for insufficient storage rent budget
  • contracts/predictify-hybrid/src/lib.rs: Integrated pre-flight check into create_market function
  • contracts/predictify-hybrid/src/market_creation_validation_tests.rs: Added tests for storage rent budget validation
  • contracts/predictify-hybrid/src/markets.rs: Updated market creation logic with rent budget check
  • contracts/predictify-hybrid/src/storage.rs: Added storage rent budget helper functions

Why

Under-funded archives can cause market creation to fail silently or behave unexpectedly. This pre-flight check ensures sufficient storage rent budget exists before proceeding.

Testing

  • Market creation fails when storage rent budget is insufficient
  • Market creation succeeds when storage rent budget is sufficient

@greatest0fallt1me greatest0fallt1me merged commit bed32d8 into Predictify-org:master Jun 29, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants